<template>
  <router-view></router-view>
</template>

<script>
import { ref, provide } from "vue";
import {router} from "./route/index.js"
export default {
  name: "App",
  setup() {
    const width = document.documentElement.clientWidth;
    const menuVisible = ref(width <= 500 ? false : true); //pc默认为true
    provide("menuVisible", menuVisible);
    router.afterEach(()=>{
       if(width<=500){
        menuVisible.value=false
       }
    })
  },
};
</script>
<style>
 .markdown-body h1{
  border-bottom: none !important;
 }
</style>
